/*
 * PoupUsersDialog.hpp
 *
 *  Created on: Jul 7, 2012
 *      Author: guillou
 */

#ifndef POUPUSERSDIALOG_HPP_
#define POUPUSERSDIALOG_HPP_

#include "ui_usersdialog.h"
#include <PopupUsersManager.hpp>
#include <PopupUsersWidget.hpp>

class PopupUsersDialog : public QDialog, private Ui_UsersDialog
{
  Q_OBJECT

public:
  PopupUsersDialog(QWidget *parent = 0,
                   const Popup::UserList & p_filterOut = Popup::EmptyUserList)
  : QDialog(parent), m_usersWidget(this, p_filterOut)
  {
    setupUi(this);
    m_vboxlayout->addWidget(&m_usersWidget);
    m_usersWidget.displayStatistics(false);
  }

  inline void getSelectedUsers(Popup::UserList & p_users) {
    m_usersWidget.getSelectedUsers(p_users);
  }

private:
  PopupUsersWidget m_usersWidget;
};

#endif /* POUPUSERSDIALOG_HPP_ */
